import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import plugins from './plugins' // plugins
import Treeselect from '@riophae/vue-treeselect' // 导入vue-treeselect
import '@riophae/vue-treeselect/dist/vue-treeselect.css' // 导入样式
// 字典数据组件
import DictData from '@/components/DictData'
// 字典标签组件
import DictTag from '@/components/DictTag'
// 引入elment-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// 引入Avue依赖
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
// 引入axios配置avue
import axios from '@/utils/request.js'
// 引入全局CSS
import '@/assets/css/gloable.css';
import { selectDictLabel } from "@/utils/dict/DictUtils.js"

// 引入自定义指令
import directive from './directive'

// 全局组件挂载
Vue.component('DictTag', DictTag)
// 注册 Treeselect 组件
Vue.component('Treeselect', Treeselect);

Vue.use(ElementUI, { size: "small" });
Vue.use(Avue, { axios })
Vue.use(plugins)
Vue.use(directive)
// 初始化字典组件
DictData.install()
// 挂载 Axios  提供给 avue使用
window.axios = axios;

Vue.prototype.selectDictLabel = selectDictLabel

Vue.config.productionTip = false

const vm = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')